QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets websockets network

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# **********************使用第三方库所需要添加的内容 start***************
DEFINES += WEBRTC_WIN  _ITERATOR_DEBUG_LEVEL=0 NOMINMAX   # WebRTC相关宏定义
DEFINES += QT_NO_KEYWORDS # 防止Qt中的emit和sigslot中的emit有冲突

WEBRTC_SRC_DIR = D:\\WorkSpace\\WebRTC\\src # WebRTC源码路径

INCLUDEPATH += $${WEBRTC_SRC_DIR} \
            $${WEBRTC_SRC_DIR}/third_party/abseil-cpp
# **********************使用第三方库所需要添加的内容 end******************


SOURCES += \
    CameraVideoCapture.cpp \
    CaptureVideoTrackSource.cpp \
    ConnectionFactory.cpp \
    JanusPeerConnection.cpp \
    LocalMediaStream.cpp \
    MediaStream.cpp \
    PublicFunHelper.cpp \
    RemoteMediaStream.cpp \
    RoomManager.cpp \
    Signaling.cpp \
    main.cpp \
    MyJanusDemo.cpp

HEADERS += \
    CameraVideoCapture.h \
    CaptureVideoTrackSource.h \
    ConnectionFactory.h \
    JanusPeerConnection.h \
    LocalMediaStream.h \
    MediaStream.h \
    MyJanusDemo.h \
    PublicFunHelper.h \
    RemoteMediaStream.h \
    RoomManager.h \
    Signaling.h

FORMS += \
    MyJanusDemo.ui

win32:{
#    以下库为系统库，WebRTC连接时需要，可能添加的有无用的系统库，暂时没有排查
    LIBS += dbghelp.lib \
        dnsapi.lib \
        msimg32.lib \
        psapi.lib \
        shlwapi.lib \
        usp10.lib \
        version.lib \
        wininet.lib \
        ws2_32.lib \
        delayimp.lib \
        crypt32.lib \
        iphlpapi.lib \
        secur32.lib \
        dmoguids.lib \
        wmcodecdspuuid.lib \
        amstrmid.lib \
        msdmo.lib \
        Winmm.lib \
        Strmiids.lib \
        Ole32.lib \
        OleAut32.lib \
        User32.lib \
        Advapi32.lib


    CONFIG(debug, debug | release):{
        QMAKE_CFLAGS_DEBUG += -MTd
        QMAKE_CXXFLAGS_DEBUG += -MTd
        contains(DEFINES, WIN64):{
            DESTDIR = $$PWD/Bin/Debug/X64
            LIBS += $${WEBRTC_SRC_DIR}/out/Debug/obj/webrtc.lib
        }
    }
    else:{
        QMAKE_CFLAGS_RELEASE += -MT
        QMAKE_CXXFLAGS_RELEASE += -MT
        contains(DEFINES, WIN64):{
            DESTDIR = $$PWD/Bin/Debug/X64
            LIBS += $${WEBRTC_SRC_DIR}/out/Release/obj/webrtc.lib
        }
    }
}

## Default rules for deployment.
#qnx: target.path = /tmp/$${TARGET}/bin
#else: unix:!android: target.path = /opt/$${TARGET}/bin
#!isEmpty(target.path): INSTALLS += target
